<?php

  interface IString {
    const EMPTY_STRING = "";

    function __toString();

    function charAt(IInteger $index);

    /**
     * Binary safe case-insensitive string comparison.
     * @param $string IString The string to compare to.
     * @return IInteger Returns < 0 if this->string is less than $string, > 0 if $this->string is greater than $string, and 0 if they are equal.
     */
    function compareTo(IString $string);

    function compareToIgnoreCase(IString $string);

    function concat(IString $string);

    function contains(IString $string);

    function contentEquals(IString $string);

    function endsWith(IString $string);

    function indexOf(IString $string);

    function isEmpty();

    function lastIndexOf(IString $string);

    function length();
    
    function padLeft(IString $char, IInteger $length);
    
    function padRight(IString $char, IInteger $length);

    function replace(IString $pattern, IString $replacement);

    function split(IString $pattern, IInteger $limit = null);

    function startsWith(IString $string);

    function subString(IInteger $start, IInteger $length = null);

    function toCharArray();

    function toLowerCase();

    function toString();

    function toUpperCase();

    function trim(IString $charlist = null);

    function trimStart(IString $charlist = null);

    function trimEnd(IString $charlist = null);

    static function copyValueOf(array $array, IInteger $start = null, IInteger $length = null);
    
    static function format(IString $string, $args);
  }

?>
